<?php /* Smarty version Smarty-3.1.6, created on 2018-05-21 00:41:10
         compiled from "D:/phpStudy/PHPTutorial/WWW/myshop/Home/View\User\address.html" */ ?>
<?php /*%%SmartyHeaderCode:9615418185afba5e9861486-07571154%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '844976117ad6c57a3b9bac68edeb33495836871f' => 
    array (
      0 => 'D:/phpStudy/PHPTutorial/WWW/myshop/Home/View\\User\\address.html',
      1 => 1526834466,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '9615418185afba5e9861486-07571154',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.6',
  'unifunc' => 'content_5afba5e9a81f8',
  'variables' => 
  array (
    'address' => 0,
    'v' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5afba5e9a81f8')) {function content_5afba5e9a81f8($_smarty_tpl) {?><?php if (!is_callable('smarty_function_math')) include 'D:\\phpStudy\\PHPTutorial\\WWW\\ThinkPHP\\Library\\Vendor\\Smarty\\plugins\\function.math.php';
?><!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>个人中心</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="format-detection" content="telephone=no">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="stylesheet" href="<?php echo @PUBLIC_PATH;?>
css/amazeui.min.css"/>
<link rel="stylesheet" href="<?php echo @IMAGES_PATH;?>
style.css"/>
<script src="<?php echo @PUBLIC_PATH;?>
js/jquery.min.js"></script>
<script src="<?php echo @PUBLIC_PATH;?>
js/amazeui.min.js"></script>
<style>
	.order a{
		border:solid 1px white !important;
		box-shadow: 0px 0px 0px white !important;
	}
	.order li{
		padding: 0px;
	}
	.order svg{
		width:60px;
		height: 60px;
		fill:#8E71B2;
	}
	.up-radio-item{
		width: 95%;
		line-height: 60px;
		height: 60px;
	}
	.up-radio-item p{
		line-height: 30px;
		height: 30px;
		margin-top: 0px;
		margin-bottom: 0px;
	}
	.up-radio-item span {
		height:4rem;
	    background: #497bae;
	    color: #fff;
	    line-height: 4rem;
	    margin: 7px 10px 0px 0px;
	    border-radius: 5px;
	    padding: 0px 10px;
	    position: absolute;
	    float: right;
	    right: 0;
	    top: 26px;
}

</style>
</head>

<body>
<div class="container" style="background-color: #ebebeb;">
	<!--引入头文件-->
	<?php echo $_smarty_tpl->getSubTemplate ("../header.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

	<script>$('.title-link').text("我的地址")</script>
	
    <div class="withdrawals-panel" style="height: 700px;">
        	<?php  $_smarty_tpl->tpl_vars['v'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['v']->_loop = false;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['address']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['v']->key => $_smarty_tpl->tpl_vars['v']->value){
$_smarty_tpl->tpl_vars['v']->_loop = true;
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['v']->key;
?>
        	<div class="am-radio up-radio-item up-radio-item<?php echo smarty_function_math(array('equation'=>rand(2,4)),$_smarty_tpl);?>
" style="position: relative;font-size: 17px;">
              <label>
                <input type="radio" name="doc-radio-1" value="option1" checked style="width: 20px; height: 20px;position: relative; top: 10px;display: none;">
                	<p style="position: relative; top: 16px;left: 4px;"><i class="am-icon-user"></i><?php echo $_smarty_tpl->tpl_vars['v']->value['name'];?>
<i class="am-icon-phone" style="margin-left: 30px;"></i><?php echo $_smarty_tpl->tpl_vars['v']->value['phone'];?>
</p>
                	<p style="position: relative;left: 4px;margin-top: 19px;width: 65%;text-overflow:ellipsis;  white-space:nowrap;overflow:hidden;"><?php echo $_smarty_tpl->tpl_vars['v']->value['province'];?>
<?php echo $_smarty_tpl->tpl_vars['v']->value['city'];?>
<?php echo $_smarty_tpl->tpl_vars['v']->value['town'];?>
<?php echo $_smarty_tpl->tpl_vars['v']->value['detail'];?>
</p>
                	<?php if ($_smarty_tpl->tpl_vars['v']->value['first']==1){?>
                		<a><span class="am-fr firstaddress" data-uid="<?php echo $_smarty_tpl->tpl_vars['v']->value['uid'];?>
" style="right: 12rem;background-color:rgba(255,255,255,0);">默认</span></a>
                	<?php }else{ ?>
                		<a><span class="am-fr notfirstaddress"  data-tochangeuid="<?php echo $_smarty_tpl->tpl_vars['v']->value['uid'];?>
" style="right: 12rem;">设为默认</span></a>
                	<?php }?>
                	<a href="<?php echo @__CONTROLLER__;?>
/editaddress/uid/<?php echo $_smarty_tpl->tpl_vars['v']->value['uid'];?>
"><span class="am-fr" style="right: 6rem;">修改</span></a>
                	<a href="<?php echo @__CONTROLLER__;?>
/deleteaddress/uid/<?php echo $_smarty_tpl->tpl_vars['v']->value['uid'];?>
"><span class="am-fr">删除</span></a>
                	
              </label>
            </div>
            <?php } ?>
            <div style="text-align: center;margin-top: 85px;position: relative;width: 100%;">
            	<a href="<?php echo @__CONTROLLER__;?>
/addaddress/userid/<?php echo $_SESSION['id'];?>
" class="am-btn am-btn-danger am-btn-block am-radius" style="width:60%;position: absolute; left: 20%;">添加新地址</a>
            </div>
        </div>
    <footer data-am-widget="footer" class="am-footer am-footer-default" data-am-footer="{  }">
        <hr data-am-widget="divider" style="" class="am-divider am-divider-default"/>
      <div class="am-footer-miscs ">
        <p>CopyRight©2014 AllMobilize Inc.</p>
        <p>京ICP备13033158</p>
      </div>
    </footer>
     <!--底部-->
    <?php echo $_smarty_tpl->getSubTemplate ("../footer.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

</div>
<script src="/Home/Public/js/jquery.min.js"></script>
<script>
//　　document.documentElement.style.fontSize = '13px';
	$('.up-radio-item').height($('.up-radio-item').width()*0.17);
//	$('.up-radio-item p').css('font-size',$('.container').width()*0.034+'px');
	$('.notfirstaddress').click(function(){ //设为默认地址
		var data={
				uid:$('.firstaddress').data('uid'),
				tochangeuid:$(this).data('tochangeuid'),
			};
			console.log(data);
		$.post("<?php echo @__CONTROLLER__;?>
/setfirstaddress", data, function(ret){
				console.log(ret);
				if(ret) window.location.reload();
			})
	})
</script>
</body>
</html>
<?php }} ?>